<?php
require_once('LapanganClass.php');  
$Lapangan = new Lapangan();
if(!isset($_POST['Sewa']))
{
    header("../page/HOME_sewa.php");    
}
else {
		$user=$_SESSION['username'];
		$tanggal_sewa = $Lapangan->GetDate();
		$nama_lap = $Lapangan->EscapeString($_GET['namalap']);
		
    $Lapangan->UpdateStlap($nama_lap);
	$Lapangan->AddTransaksi($user,$tanggal_sewa,$nama_lap);
}
$Lapangan->Disconnect();

?>